IconCache: Keep a ref on the GtkIconData
authorAlexander Larsson <alexl@redhat.com>
Wed, 19 Jun 2013 07:32:38 +0000 (09:32 +0200)
committerAlexander Larsson <alexl@redhat.com>
Wed, 19 Jun 2013 07:40:19 +0000 (09:40 +0200)
commit280d606cd41c5d607e56d48e57bcba5b654cfa2e
treed399f131e25559585acf88421015ed940011b99f
parent3be5aefa3f12285ff1e276a8916d9620bda2981b
IconCache: Keep a ref on the GtkIconData

The icon data in GttkIconInfo->data is currently owned by the
IconThemeDir->icon_data hashtable. However, on e.g. a theme change
blow_themes() destroys the dirs and thus the data, meaning any
outstanding GtkIconInfo points to stale data.

We solve this by adding a refcount to GtkIconData and reffing it
from GtkIconInfo.

https://bugzilla.gnome.org/show_bug.cgi?id=702598
gtk/gtkiconcache.c
gtk/gtkiconcache.h
gtk/gtkicontheme.c